package com.ihg.hiex.admin.entity.dto;

/**
 * 
 * @author mohanlan
 *
 */
public class RevenueMaximisation {
	
	private String assessorEvalution;
    
    private String internalBenchmark;
    
    private String externalBenchmark;
    
    private int qssj;
    
    private int zlhjlss;
    
    private int zzjh;
    
    private int dxwt;
    
    private int tcxf;
    
    private int ttknx;
    
    private int fzcl;
    
    private int zdtr;
    
    private int potential;
    
    /**
     * The default constructor
     */
    public RevenueMaximisation() {
	}
    
    /**
     * 
     * @param qssj
     * @param zlhjlss
     * @param zzjh
     * @param dxwt
     * @param tcxf
     * @param ttknx
     * @param fzcl
     * @param zdtr
     */
    public RevenueMaximisation(int qssj, int zlhjlss, int zzjh, int dxwt, int tcxf, int ttknx, int fzcl, int zdtr) {
        this.qssj = qssj;
        this.zlhjlss = zlhjlss;
        this.zzjh = zzjh;
        this.dxwt = dxwt;
        this.tcxf = tcxf;
        this.ttknx = ttknx;
        this.fzcl = fzcl;
        this.zdtr = zdtr;
        double po = (qssj + zlhjlss + zzjh + dxwt + tcxf + ttknx + fzcl + zdtr) * 0.125;
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(6.88)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.50)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.25)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.88)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.50)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.13)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.75)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.50)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.13)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
    }
    
    /**
     * 
     * @param assessorEvalution
     * @param internalBenchmark
     * @param externalBenchmark
     * @return
     */
    public RevenueMaximisation init(String assessorEvalution, String internalBenchmark, String externalBenchmark) {
        this.assessorEvalution = assessorEvalution;
        this.internalBenchmark = internalBenchmark;
        this.externalBenchmark = externalBenchmark;
        return this;
    }
    
    /**
     * 
     * @param qssj
     * @param zlhjlss
     * @param zzjh
     * @param dxwt
     * @param tcxf
     * @param ttknx
     * @param fzcl
     * @param zdtr
     * @return
     */
    public RevenueMaximisation init(int qssj, int zlhjlss, int zzjh, int dxwt, int tcxf, int ttknx, int fzcl, int zdtr) {
        this.qssj = qssj;
        this.zlhjlss = zlhjlss;
        this.zzjh = zzjh;
        this.dxwt = dxwt;
        this.tcxf = tcxf;
        this.ttknx = ttknx;
        this.fzcl = fzcl;
        this.zdtr = zdtr;
        double po = (qssj + zlhjlss + zzjh + dxwt + tcxf + ttknx + fzcl + zdtr) * 0.125;
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(6.88)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.50)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.25)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.88)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.50)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.13)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.75)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.50)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.13)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
        
        return this;
    }

	public String getAssessorEvalution() {
		return assessorEvalution;
	}

	public void setAssessorEvalution(String assessorEvalution) {
		this.assessorEvalution = assessorEvalution;
	}

	public String getInternalBenchmark() {
		return internalBenchmark;
	}

	public void setInternalBenchmark(String internalBenchmark) {
		this.internalBenchmark = internalBenchmark;
	}

	public String getExternalBenchmark() {
		return externalBenchmark;
	}

	public void setExternalBenchmark(String externalBenchmark) {
		this.externalBenchmark = externalBenchmark;
	}

	public int getQssj() {
		return qssj;
	}

	public void setQssj(int qssj) {
		this.qssj = qssj;
	}

	public int getZlhjlss() {
		return zlhjlss;
	}

	public void setZlhjlss(int zlhjlss) {
		this.zlhjlss = zlhjlss;
	}

	public int getZzjh() {
		return zzjh;
	}

	public void setZzjh(int zzjh) {
		this.zzjh = zzjh;
	}

	public int getDxwt() {
		return dxwt;
	}

	public void setDxwt(int dxwt) {
		this.dxwt = dxwt;
	}

	public int getTcxf() {
		return tcxf;
	}

	public void setTcxf(int tcxf) {
		this.tcxf = tcxf;
	}

	public int getTtknx() {
		return ttknx;
	}

	public void setTtknx(int ttknx) {
		this.ttknx = ttknx;
	}

	public int getFzcl() {
		return fzcl;
	}

	public void setFzcl(int fzcl) {
		this.fzcl = fzcl;
	}

	public int getZdtr() {
		return zdtr;
	}

	public void setZdtr(int zdtr) {
		this.zdtr = zdtr;
	}

	public int getPotential() {
		return potential;
	}

	public void setPotential(int potential) {
		this.potential = potential;
	}
}
